#        Copyright (c) 2021 LiuBingyi
#        SimpleMark is licensed under Mulan PubL v2.
#        You can use this software according to the terms and conditions of the Mulan PubL v2.
#        You may obtain a copy of Mulan PubL v2 at:
#                 http://license.coscl.org.cn/MulanPubL-2.0
#  	     THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
#        EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
#        MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#        See the Mulan PubL v2 for more details.

cc ?= gcc
independent_inc ?= $(include)independent$(DSC)
independent_src ?= $(src)independent$(DSC)
objectBasic = $(shared)basic_io.o $(shared)basic_lib.o

$(bin)basic$(dySuffix) : $(objectBasic)
	$(cc) -shared $^ -o $@ $(userFlag) $(fpic)
$(shared)basic_io.o : $(independent_src)basic_io.c $(independent_inc)basic_io.h $(independent_inc)basic.h 
	$(cc) -static -c $(independent_src)basic_io.c -o $@ -I $(independent_inc) -D_EXPORTING $(fpic) $(userFlag)
$(shared)basic_lib.o : $(independent_src)basic_lib.c $(independent_inc)basic_lib.h $(independent_inc)basic.h
	$(cc) -static -c $(independent_src)basic_lib.c -o $@ -I $(independent_inc) -D_EXPORTING $(fpic) $(userFlag)